﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace WpfApplication1
{
    class DALcustomers
    {
        public DALcustomers() { }
        public void InsertCustomer(int id, string name)
        {

            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = "Data Source=(local);Initial Catalog=sale; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("insert into customers values(" + id.ToString() + ",'" + name + "')", conn);
            cmd.ExecuteNonQuery();
            conn.Close();
        }
    }
}

